filter Or Else
open override fun filterOrElse(predicate: (Nothing) -> Boolean, throwable: (Nothing) -> Throwable): Try<Nothing>
Content copied to clipboard
Returns the same Success if the predicate is satisfied for the value. Otherwise returns a Failure containing the given throwable.
Return
The same Success if the predicate is satisfied for the value. Otherwise returns a Failure containing the given throwable.
Since
1.2
Parameters
predicate
Predicate function.
throwable
Function providing a throwable to be used when the predicate is not satisfied.